3.12 \(\int \csc ^2(e+f x) (a+b \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=26 \[ \frac{b \tan (e+f x)}{f}-\frac{(a+b) \cot (e+f x)}{f} \]

[Out]

-(((a + b)*Cot[e + f*x])/f) + (b*Tan[e + f*x])/f

________________________________________________________________________________________

Rubi [A]  time = 0.0335316, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4132, 14} \[ \frac{b \tan (e+f x)}{f}-\frac{(a+b) \cot (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^2*(a + b*Sec[e + f*x]^2),x]

[Out]

-(((a + b)*Cot[e + f*x])/f) + (b*Tan[e + f*x])/f

Rule 4132

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_), x_Symbol] :> With[{ff = Fr
eeFactors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p)/(
1 + ff^2*x^2)^(m/2 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && Integer
Q[n/2]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{a+b+b x^2}{x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (b+\frac{a+b}{x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{(a+b) \cot (e+f x)}{f}+\frac{b \tan (e+f x)}{f}\\ \end{align*}

Mathematica [A]  time = 0.0644044, size = 36, normalized size = 1.38 \[ -\frac{a \cot (e+f x)}{f}+\frac{b \tan (e+f x)}{f}-\frac{b \cot (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^2*(a + b*Sec[e + f*x]^2),x]

[Out]

-((a*Cot[e + f*x])/f) - (b*Cot[e + f*x])/f + (b*Tan[e + f*x])/f

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 43, normalized size = 1.7 \begin{align*}{\frac{1}{f} \left ( -\cot \left ( fx+e \right ) a+b \left ({\frac{1}{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }}-2\,\cot \left ( fx+e \right ) \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^2*(a+b*sec(f*x+e)^2),x)

[Out]

1/f*(-cot(f*x+e)*a+b*(1/sin(f*x+e)/cos(f*x+e)-2*cot(f*x+e)))

________________________________________________________________________________________

Maxima [A]  time = 0.966755, size = 35, normalized size = 1.35 \begin{align*} \frac{b \tan \left (f x + e\right ) - \frac{a + b}{\tan \left (f x + e\right )}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

(b*tan(f*x + e) - (a + b)/tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 0.454164, size = 85, normalized size = 3.27 \begin{align*} -\frac{{\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b}{f \cos \left (f x + e\right ) \sin \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

-((a + 2*b)*cos(f*x + e)^2 - b)/(f*cos(f*x + e)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \csc ^{2}{\left (e + f x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**2*(a+b*sec(f*x+e)**2),x)

[Out]

Integral((a + b*sec(e + f*x)**2)*csc(e + f*x)**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.31167, size = 38, normalized size = 1.46 \begin{align*} \frac{b \tan \left (f x + e\right ) - \frac{a + b}{\tan \left (f x + e\right )}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

(b*tan(f*x + e) - (a + b)/tan(f*x + e))/f